import request from '@/config/axios'

// 招生基础设置 VO
export interface SettingsVO {
  id: number // 主键
  imrProfile: string // 金属所简介
  remark: string // 备注
}

// 招生基础设置 API
export const SettingsApi = {
  // 查询招生基础设置分页
  getSettingsPage: async (params: any) => {
    return await request.get({ url: `/recruit/settings/page`, params })
  },

  // 查询招生基础设置详情
  getSettings: async (id: number) => {
    return await request.get({ url: `/recruit/settings/get?id=` + id })
  },

  // 新增招生基础设置
  createSettings: async (data: SettingsVO) => {
    return await request.post({ url: `/recruit/settings/create`, data })
  },

  // 修改招生基础设置
  updateSettings: async (data: SettingsVO) => {
    return await request.put({ url: `/recruit/settings/update`, data })
  },

  // 删除招生基础设置
  deleteSettings: async (id: number) => {
    return await request.delete({ url: `/recruit/settings/delete?id=` + id })
  },

  // 导出招生基础设置 Excel
  exportSettings: async (params) => {
    return await request.download({ url: `/recruit/settings/export-excel`, params })
  }
}
